import request from '@/utils/request'
import qs from 'qs'

export function userFind(newData) {
  const data = {
    ...newData
  }
  return request({
    url: `/admin/user/findSmall`,
    method: 'post',
    data: qs.stringify(data)
  })
}

export function userStop(state, userid) {
  const data = {
    state,
    userid
  }
  return request({
    url: `admin/user/optSamllUser`,
    method: 'post',
    data: qs.stringify(data)
  })
}

export function agencyCity(newData) {
  const data = {
    ...newData
  }
  return request({
    url: `/admin/apply/findAgent`,
    method: 'post',
    data: qs.stringify(data)
  })
}

export function agencyState(newData) {
  const data = {
    ...newData
  }
  return request({
    url: `/admin/apply/optAgent`,
    method: 'post',
    data: qs.stringify(data)
  })
}

export function agencyId(newData) {
  const data = {
    ...newData
  }
  return request({
    url: `/admin/apply/findIde`,
    method: 'post',
    data: qs.stringify(data)
  })
}
export function agencyIdState(newData) {
  const data = {
    ...newData
  }
  return request({
    url: `/admin/apply/optIde`,
    method: 'post',
    data: qs.stringify(data)
  })
}
export function adiutEntFind(newData) {
  const data = {
    ...newData
  }
  return request({
    url: `/admin/apply/findEnt`,
    method: 'post',
    data: qs.stringify(data)
  })
}
export function adiutEnt(newData) {
  const data = {
    ...newData
  }
  return request({
    url: `/admin/apply/optEnt`,
    method: 'post',
    data: qs.stringify(data)
  })
}
export function withDrawList(newData) {
  const data = {
    ...newData
  }
  return request({
    url: `/admin/withdraw/find`,
    method: 'post',
    data: qs.stringify(data)
  })
}
export function withDraw(newData) {
  const data = {
    ...newData
  }
  return request({
    url: `/admin/withdraw/update`,
    method: 'post',
    data: qs.stringify(data)
  })
}

export function system(newData) {
  const data = {
    ...newData
  }
  return request({
    url: `/admin/user/find`,
    method: 'post',
    data: qs.stringify(data)
  })
}

export function systemDelete(newData) {
  const data = {
    ...newData
  }
  return request({
    url: `/admin/user/delete`,
    method: 'post',
    data: qs.stringify(data)
  })
}

export function systemAdd(newData) {
  const data = {
    ...newData
  }
  return request({
    url: `/admin/user/add`,
    method: 'post',
    data: qs.stringify(data)
  })
}

export function systemUpdate(newData) {
  const data = {
    ...newData
  }
  return request({
    url: `/admin/user/update`,
    method: 'post',
    data: qs.stringify(data)
  })
}
